/*
 * MandelbrotQuadTree.h
 *
 *  Created on: 15.07.2012
 *      Author: 116
 */

#ifndef MANDELBROTQUADTREE_H_
#define MANDELBROTQUADTREE_H_


enum PositionInParent
{
    Root = -1, TopLeft, TopRight, BottomLeft, BottomRight
};

enum NodeStatus
{
    VOID, // the node was never browsed
    BROWSED, // the node was browsed but was neither completely inside nor outside
    INSIDE, // the node is completely inside the mandelbrot set
    OUTSIDE // the node is completely inside the mandelbrot set
};

typedef struct MandelbrotQuadTree
{
	struct MandelbrotQuadTree * parent;
	struct MandelbrotQuadTree * children;

	double minX, maxX, minY, maxY;
	enum PositionInParent positionInParent;

	enum NodeStatus status;
	//makes sense only in the case of "OUTSIDE" nodes
	unsigned int minIter;
	unsigned int maxIter;
} MandelbrotQuadTree;

#endif /* MANDELBROTQUADTREE_H_ */
